#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
import threading
import time


def myprint(obj):
    sys.stdout.write(str(obj) + '\n')


class ClockThread(threading.Thread):

    def __init__(self, interval):
        threading.Thread.__init__(self)
        self.daemon = True
        self.interval = interval

    def run(self):
        while True:
            myprint('the time is %s' % time.ctime())
            time.sleep(self.interval)


t = ClockThread(1)
t.start()
